{inc:header.htm}

<div id="divMain">
	<section>
		<div class="container th_margintop">
			<div class="row">
				<!--左侧start-->
				<div class="col-md-9 col-xs-12">
					<section>
						<div class="thjingxuan">
							<div class="thjingxuan_title categorylist"><i></i>
								<a href="{$cfg[weburl]}" title="{$cfg[webname]}">首页</a>{loop:$cfg_var[place] $v}<span>/</span> <a href="{$v[url]}">{$v[name]}</a>{/loop}
							</div>
							<section class="thjingxuan_sec">
								{block:global_show show_prev_next="1" dateformat="Y-m-d"}
								<h1 class="detail-title">{$gdata[title]}</h1>
								<div class="detail-icon">
									<p class="meta">
										<span><i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;{$gdata[date]}</span>
										<span><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;阅读&nbsp;{$gdata[views]}</span>
										<span><i class="fa fa-comments" aria-hidden="true"></i>&nbsp;评论&nbsp;{$gdata[comments]}</span>
									</p>
								</div>
								<div class="detail-zhaiyao">
									<span style="color:#3297fc;">摘要：</span>{$gdata[intro]}
								</div>
								<div class="detail-con">{$gdata[content]}</div>
								<div class="umCopyright">
									<p>
										版权声明：xxxxxxxxx；
									</p>
									<p>原文链接：<a href="{$gdata[absolute_url]}" title="{$gdata[title]}" style="color:#999">{$gdata[absolute_url]}</a></p>
								</div>
								{if:isset($gdata[prev][url]) || isset($gdata[next][url])}
								<div class="detail-arr">
									<div class="detail-arr-left">上一篇：{if:isset($gdata[prev][url])}<a href="{$gdata[prev][url]}" title="{$gdata[prev][title]}">{$gdata[prev][title]}</a>{else}没有了{/if}</div>
									<div class="detail-arr-right">下一篇：{if:isset($gdata[next][url])}<a href="{$gdata[next][url]}" title="{$gdata[next][title]}">{$gdata[next][title]}</a>{else}没有了{/if}</div>
								</div>
								{/if}
								{if:isset($gdata['tag_arr'])}
								<div class="detail-tags">
									<i class="fa fa-tags"></i>标签：{loop:$gdata[tag_arr] $v}<a class="th_hover_a1" href="{$v[url]}" title="{$v[name]}">{$v[name]}</a>{/loop}
								</div>
								{/if}

								{/block}

								{block:taglike type="1" limit="5" dateformat="Y-m-d"}
								{if:$data[list]}
								<div class="row" style="margin-top: 10px;">
									<section>
										<div class="thleftcon">
											<div class="thleftbt thwenzhang"><span><a href="{$data[tag_url]}">{$data[tag_name]}</a></span></div>
											<ul class="th-5">
												{loop:$data[list] $v}<li class="post_id_{$v[id]}"><span class="date">{$v[date]}</span><a href="{$v[url]}" title="{$v[title]}" target="_blank">{$v[subject]}</a></li>{/loop}
											</ul>
										</div>
									</section>
								</div>
								{/if}
								{/block}
							</section>

							<!--评论列表start-->
							{block:comment pagenum="2" firstnum="2"}
							{if:!empty($data[list])}
							<div class="comment_list" id="ctf">
								<p class="posttop" style="border-bottom: 1px solid #eaeaea;"><a name="comment" href="javascript:;"> 评论列表:</a></p>
								{loop:$data[list] $v}
								<ul class="msg" id="comment_{$v[commentid]}">
									<li class="msgname">
										<img class="avatar" src="{$v[avatar]}" width="32">&nbsp;
										<span class="commentname">{$v[author]}</span><br><small>&nbsp;发布于&nbsp;{$v[date]}</small><small><a class="reply_comment" href="javascript:;" onclick="reply_comment({$v[commentid]});">回复该评论</a></small>
									</li>
									{if:$v[reply_comment_content]}<li class="reply_msgarticle">回复：{$v[reply_comment_content]}</li>{/if}
									<li class="msgarticle">{$v[content]}</li>
								</ul>
								{/loop}
								<a id="load_more" href="javascript:;" next_url="{$data[next_url]}" isnext="{$data[isnext]}">显示更多评论</a>
							</div>
							{/if}
							{/block}
							<!--评论列表end-->

							<!--发布评论start-->
							<div id="divCommentPost" class="post">
								<p class="posttop"><a name="comment" href="javascript:;">发表评论:</a></p>
								<form id="ctf_form" action="{$cfg[webdir]}index.php?comment-post-ajax-1.html" method="post">
									<input type="hidden" name="cid" value="{$gdata[cid]}" />
									<input type="hidden" name="id" value="{$gdata[id]}" />
									<input type="hidden" name="reply_commentid" value="0" />
									<div id="reply_comment_div">
										<p class="posttop"><a>回复评论:</a>
											<a rel="nofollow" id="cancel_reply_comment" href="javascript:;" onclick="cancel_reply_comment();"><small>取消回复</small></a>
										</p>
										<div id="reply_comment_content"></div>
									</div>
									{if:$_uid}
									<input type="hidden" name="author" value="{$author}" />
									{else}
									<p style="margin-top:10px"><input type="text" name="author" id="ctf_author" class="text" value="{$author}" placeholder="昵称" size="28" tabindex="1"></p>
									{/if}
									{if:$cfg[open_comment_vcode]}
									<p style="margin-top:10px;margin-left: 0;" class="row">
										<span class="col-md-4 col-xs-6" style="padding-left: 0;">
											<input name="vcode" id="ctf_vcode" type="text" class="text" required placeholder="图形验证码" autocomplete="off" />
										</span>
										<span class="col-md-4 col-xs-6">
											<img id="captchaPic" src="{$cfg[webdir]}index.php?comment-vcode" onclick="this.src='{$cfg[webdir]}index.php?comment-vcode-r-'+Math.random();" alt="验证码" />
										</span>
									</p>
									{/if}
									<p style="margin-top:10px"><textarea name="content" id="ctf_content" maxlength="255" class="text" cols="50" rows="4" tabindex="5" placeholder="文明上网，理性发言" autocomplete="off"></textarea></p>
									<p><input name="sumbit" type="submit" tabindex="6" value="提交" id="ctf_submit" class="button"></p>
								</form>
								<p class="postbottom"></p>
							</div>
							<!--发布评论end-->
						</div>
					</section>
				</div>
				<!--左侧end-->
				<div class="col-md-3 col-xs-12 wap_margintop">
					<div>
						{block:user_info}
						<section>
							<div class="thleftcon" style="height: 335px;">
								<div class="thleftcon-1">
									<img class="th-img jsimg-height" src="{$cfg[tpl]}style/img/tx.jpg">
									<img class="th-img jsimg-toux" src="{$data[avatar]}">
								</div>
								<div class="thjs_infor">
									<h4>{$data[author]}</h4>
									<div class="clear"></div>
								</div>
								<div class="thleftcon-2">
									<dl>
										<dd>{$data[intro]}</dd>
									</dl>
								</div>
								<div class="aut_count">
									<ul>
										<li><span>内容</span><strong>{$data[contents]}</strong></li>
										<li><span>积分</span><strong>{$data[credits]}</strong></li>
										<li><span>金币</span><strong>{$data[golds]}</strong></li>
									</ul>
								</div>
							</div>
						</section>
						{/block}
					</div>
					<!--当前分类最新文章start-->
					<div class="th_margintop">
						{block:list limit="8" titlenum="24" dateformat="m-d"}
						<section>
							<div class="thleftcon">
								<div class="thleftbt"><span>最新文章</span></div>
								<ul class="th-5">
									{php}$rank = 1;{/php}
									{loop:$data[list] $v}
									<li class="post_id_{$v[id]}"><span class="date">{$v[date]}</span><i>{$rank}</i><a href="{$v[url]}" title="{$v[title]}">{$v[subject]}</a></li>
									{php}$rank++;{/php}
									{/loop}
								</ul>
							</div>
						</section>
						{/block}
					</div>
					<!--当前分类最新文章end-->
					<!--当前分类阅读排行榜start-->
					<div class="th_margintop">
						{block:list_top orderby="views" limit="8" titlenum="24"}
						<section>
							<div class="thleftcon">
								<div class="thleftbt"><span>阅读排行</span></div>
								<ul class="th-5">
									{php}$rank = 1;{/php}
									{loop:$data[list] $v}
									<li class="post_id_{$v[id]}"><span class="date">{$v[views]}℃</span><i>{$rank}</i><a href="{$v[url]}" title="{$v[title]}">{$v[subject]}</a></li>
									{php}$rank++;{/php}
									{/loop}
								</ul>
							</div>
						</section>
						{/block}
					</div>
					<!--当前分类阅读排行榜end-->
					<!--随机文章start-->
					<div class="th_margintop">
						<section>{inc:rand.htm}</section>
					</div>
					<!--随机文章end-->
					<!--热门标签start-->
					<div class="th_margintop">
						<section>
							<div class="thleftcon">
								<div class="thleftbt"><span>热门标签</span></div>
								<ul class="th-7">
									{block:taglist mid="2" limit="30" orderby="count"}
									{loop:$data[list] $v}
									<li class="tag_id_{$v[tagid]}"><a title="{$v[name]}" href="{$v[url]}">{$v[name]}</a></li>
									{/loop}
									{/block}
								</ul>
							</div>
						</section>
					</div>
					<!--热门标签end-->
				</div>
			</div>
		</div>
	</section>
</div>
{inc:footer.htm}
<script type="text/javascript" src="{$cfg[webdir]}static/js/pxmu.min.js"></script>
<script type="text/javascript">
//回复某评论
function reply_comment(commentid){
	$("input[name='reply_commentid']").val(commentid);

	var comment = $("#comment_"+commentid+">.msgarticle").html();
	$("#reply_comment_content").html(comment);
	$("#reply_comment_div").show();
}
//取消回复某评论
function cancel_reply_comment() {
	$("input[name='reply_commentid']").val(0);
	$("#reply_comment_div").hide();
}
//加载更多评论
(function(){
	var obj = $("#load_more");
	var next_url = obj.attr("next_url");
	var isnext = obj.attr("isnext");

	var no_more = function() {
		obj.html("没有更多评论了");
		if(typeof load_more != "undefined") obj.off("click", load_more);
	}

	if(isnext < 1) { no_more(); return; }

	var leJosnLock = false;
	var load_more = function() {
		if(!next_url || leJosnLock) return;
		obj.html("玩命加载中...");
		leJosnLock = true;

		$.get(next_url, function(data) {
			try{
				var json = eval("("+data+")");
				next_url = json.next_url;
				$.each(json.list_arr, function(i,item) {
					var s = '<ul class="msg" id="comment_'+item.commentid+'">';
						s += '<li class="msgname"><img class="avatar" src="'+item.avatar+'" width="32">&nbsp;';
						s += '<span class="commentname">'+item.author+'</span><br><small>发布于&nbsp;'+item.date+'</small><small><a class="reply_comment" href="javascript:;" onclick="reply_comment('+item.commentid+');">回复该评论</a></small></li>';

						if(item.reply_comment_content){
							s += '<li class="reply_msgarticle">回复：'+item.reply_comment_content+'</div>';
						}

						s += '<li class="msgarticle">'+item.content+'</div>';
						s += '</ul>';
					$(".comment_list>ul:last").after(s);
				});

				obj.html("显示更多评论");
				leJosnLock = false;
				if(json.isnext < 1) no_more();
			}catch(e){
				alert(data);
			}
		});
	}
	obj.click(load_more);
})();
</script>
</body>
</html>

